﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace CarbonExchange.Bll
{
    public class AmeeDataCatagoryFactory : AmeeFactoryBase<AmeeDataCatagory>
    {
        public AmeeDataCatagory GetByPath(string path, string choices)
        {
            XDocument doc = Command.SendXmlGet(BuildAmeeDataDrillDownPath(path, choices));
            var item = doc.Root.Element("DrillDownResource");
            if (item != null)
            {
                return new AmeeDataCatagory(item, path);
            }
            else
            {
                return null;
            }
        }

    }
}
